package admin

import (
	"context"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) PhoneLogin(ctx context.Context, req *system.PhoneLoginReq) (res *system.PhoneLoginRes, err error) {
	res = new(system.PhoneLoginRes)
	res.Token, err = service.SystemLogin().PhoneSmsCodeLogin(ctx, req.Phone, req.Code)
	return
}
